package com.sophossystems.client.asmon.dto;

import java.io.Serializable;


/** 
 * This class represents the primary key of the Privilege table.
 */
public class PrivilegePkDTO implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -8922062331196651808L;

	protected int idPrivilege;

	/** 
	 * This attribute represents whether the primitive attribute idPrivilege is null.
	 */
	protected boolean idPrivilegeNull;

	/** 
	 * Sets the value of idPrivilege
	 */
	public void setIdPrivilege(int idPrivilege)
	{
		this.idPrivilege = idPrivilege;
	}

	/** 
	 * Gets the value of idPrivilege
	 */
	public int getIdPrivilege()
	{
		return idPrivilege;
	}

	/**
	 * Method 'PrivilegePk'
	 * 
	 */
	public PrivilegePkDTO()
	{
	}

	/**
	 * Method 'PrivilegePk'
	 * 
	 * @param idPrivilege
	 */
	public PrivilegePkDTO(final int idPrivilege)
	{
		this.idPrivilege = idPrivilege;
	}

	/** 
	 * Sets the value of idPrivilegeNull
	 */
	public void setIdPrivilegeNull(boolean idPrivilegeNull)
	{
		this.idPrivilegeNull = idPrivilegeNull;
	}

	/** 
	 * Gets the value of idPrivilegeNull
	 */
	public boolean isIdPrivilegeNull()
	{
		return idPrivilegeNull;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	@Override
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof PrivilegePkDTO)) {
			return false;
		}
		
		final PrivilegePkDTO _cast = (PrivilegePkDTO) _other;
		if (idPrivilege != _cast.idPrivilege) {
			return false;
		}
		
		if (idPrivilegeNull != _cast.idPrivilegeNull) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	@Override
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idPrivilege;
		_hashCode = 29 * _hashCode + (idPrivilegeNull ? 1 : 0);
		return _hashCode;
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	@Override
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.sophossystems.client.asmon.dto.PrivilegePk: " );
		ret.append( "idPrivilege=" + idPrivilege );
		return ret.toString();
	}

}
